<%@ page import="java.lang.Runnable"%>
<%@ page import="java.lang.Thread"%>
<%@ page import="net.tinyos.tools.ListenLuoSensor"%>




<%
	class OpenCommRunnable implements Runnable{
		private int usb;
		public OpenCommRunnable(int usbnum){
			this.usb=usbnum;
		}	
		public void run(){
			ListenLuoSensor gg = new ListenLuoSensor();
			String str1="serial@/dev/ttyUSB"+usb+":telosb";
			gg.mainfunction("-comm",str1);	
		}
	}

%>

<%
	int usbnum[]={53,77,74,76,49,51,52,78,50,75,35,13,14,36,37,38,10,11,12,34,65,42,43,41,67,66,64,40,39,68,30,29,9,8,6,31,5,32,33,7,25,0,1,28,4,3,24,2,27,26,46,44,69,72,47,45,71,73,48,70,22,23,20,21,60,61,59,19,62,63,18,17,56,55,16,57,58,54};

	for(int i=0;i<78;i++){//
      		new Thread(new OpenCommRunnable(usbnum[i])).start();
	}
	out.println("success");
	%>
